/**
 * 
 */
package com.alphasystem.commerce.common.valuelist;

import static org.apache.commons.lang.StringUtils.isBlank;

import java.util.Comparator;

/**
 * @author sali
 * 
 */
public class ValueListComparator implements Comparator<ValueListObject> {

	@Override
	public int compare(ValueListObject o1, ValueListObject o2) {
		int result = 0;
		String id1 = o1.getName();
		String id2 = o2.getName();
		if (isBlank(id1)) {
			result = -1;
		} else if (isBlank(id2)) {
			result = 1;
		}
		return result;
	}

}
